const myOrder = require('./myOrder/index')
const addOrder = require('./addOrder/index')
const getOrder = require('./getOrder/index')
const updateOrder = require('./updateOrder/index')
const deleteOrder = require('./deleteOrder/index')

// 云函数入口函数
exports.main = async (event, context) => {
  switch (event.type) {
    case 'myOrder':
      return await myOrder.main(event, context)
    case 'addOrder':
      return await addOrder.main(event, context)
    case 'getOrder':
      return await getOrder.main(event, context)
    case 'updateOrder':
      return await updateOrder.main(event, context)
    case 'deleteOrder':
      return await deleteOrder.main(event, context)
  }
}